import request from '@/config/axios'

export interface ClientServiceVO {
  id: number
  serviceName: string
  serviceCode: string
  serviceType: byte
  description: string
  validDays: number
}

// 查询C端服务列表
export const getClientServicePage = async (params) => {
  return await request.get({ url: `/client-mall/product/client-service/page`, params })
}

// 查询C端服务详情
export const getClientService = async (id: number) => {
  return await request.get({ url: `/client-mall/product/client-service/get?id=` + id })
}

// 新增C端服务
export const createClientService = async (data: ClientServiceVO) => {
  return await request.post({ url: `/client-mall/product/client-service/create`, data })
}

// 修改C端服务
export const updateClientService = async (data: ClientServiceVO) => {
  return await request.put({ url: `/client-mall/product/client-service/update`, data })
}

// 删除C端服务
export const deleteClientService = async (id: number) => {
  return await request.delete({ url: `/client-mall/product/client-service/delete?id=` + id })
}

// 导出C端服务 Excel
export const exportClientService = async (params) => {
  return await request.download({ url: `/client-mall/product/client-service/export-excel`, params })
}
